import http from '../../utils/request'

export async function getExamInfoById(examId) {
  return http.request({
    url: `/teacher/getExamInfoById?examId=${examId}`,
    method: 'get',
  })
}

export async function getQuestionById(id) {
    return http.request({
      url: `/teacher/getQuestionById/${id}`,
      method: 'get',
    })
}

export async function getQuestionBank() {
    return http.request({
      url: '/teacher/getQuestionBank',
      method: 'get',
    })
}

export async function getQuestion(questionType,questionBank,questionContent,pageNo,pageSize) {
    return http.request({
      url: `/teacher/getQuestion?questionType=${questionType}&questionBank=${questionBank}&questionContent=${questionContent}&pageNo=${pageNo}&pageSize=${pageSize}`,
      method: 'get',
    })
}

export async function updateExamInfo(data) {
    return http.request({
      url: '/teacher/updateExamInfo',
      method: 'post',
      data
    })
}
